//
//  MyTaskCell.m
//  MarkPlatform
//
//  Created by 敖然 on 2017/12/23.
//  Copyright © 2017年 AT. All rights reserved.
//

#import "MPMyTaskCell.h"

@interface MPMyTaskCell()

@property (weak, nonatomic) IBOutlet UIImageView *imageView;
@property (weak, nonatomic) IBOutlet UIImageView *iconView;
@property (weak, nonatomic) IBOutlet UILabel *titleLabel;
@property (weak, nonatomic) IBOutlet UILabel *detailLabel;
@property (weak, nonatomic) IBOutlet UILabel *priceLabel;

@end

@implementation MPMyTaskCell

- (void)awakeFromNib {
    [super awakeFromNib];
    // Initialization code
}

- (void)setModel:(MPTaskModel *)model {
    _model = model;
    if (_model.type == MPTaskTypeMark) {
        self.iconView.image = [UIImage imageNamed:@"icon_biaozhu_nor"];
    }
    else {
        self.iconView.image = [UIImage imageNamed:@"icon_shenhe_nor"];
    }
    self.titleLabel.text = _model.title;
    self.detailLabel.text = _model.step;
    self.priceLabel.text = [NSString stringWithFormat:@"¥ %.2f",_model.price];
    [self.imageView sd_setImageWithURL:[NSURL URLWithEncodeString:_model.url]];
}
#pragma mark - delegate



@end
